package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;

/**
 * 建议对象
 *
 * @author happiness
 * @date 2023-10-21
 */
@Schema(name = "Advice", description = "建议")
@Accessors(chain = true)
@Getter
@Setter
@Data
@TableName("biz_advice")
public class Advice extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "advice_id", type = IdType.ASSIGN_ID)
    private Long adviceId;

    
    

    /**
     *
     */
    @Schema(description = "模块名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "")
    private Long adviceTagsId;

    /**
     * 提交人
     */
    @Schema(description = "提交人", requiredMode = Schema.RequiredMode.REQUIRED)
    @Excel(name = "提交人")
    private Long userId;

    /**
     * 提交人部门id
     */
    @TableField(exist = false)
    private Long deptId;

    /**
     * 提交人部门名称
     */
    @TableField(exist = false)
    private String deptName;

    /**
     *
     */
    @Schema(description = "提交人姓名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "")
    @TableField(exist = false)
    private String username;

    /**
     * 当前执行人
     */
    @Schema(description = "处理人id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "当前执行人")
    private Long operUserId;

    /**
     *
     */
    @Schema(description = "处理人姓名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "")
    @TableField(exist = false)
    private String operUsername;

    /**
     * 已提交 未处理 已处理
     */
    @Schema(description = "内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "")
    private String adviceText;

    /**
     *
     */
    @Schema(description = "建议状态0-未处理;1-已处理", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Excel(name = "")
    private String adviceStatus;

    /**
     *
     */
    @Schema(description = "")
    @Excel(name = "")
    private Long likeCounts;

    /**
     * Y-N
     */
    @Schema(description = "Y-N")
    @Excel(name = "Y-N")
    private String isAnonymous;

    /**
     * 是否删除|0-否 1-是|valid
     */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;

    @TableField(exist = false)
    private List<String> url;


    @TableField(exist = false)
    @Schema(description = "需我处理-查看人id")
    private Long watchUserId;
    @Schema(description = "watcher-需我处理;adder-我的建议;oper-需我执行", requiredMode = Schema.RequiredMode.REQUIRED)
    @TableField(exist = false)
    private String type;

    @TableField(exist = false)
    @Schema(description = "建议模块", requiredMode = Schema.RequiredMode.REQUIRED)
    private String label;

    @TableField(exist = false)
    //提交人姓名
    @Schema(description = "提交人头像", requiredMode = Schema.RequiredMode.REQUIRED)
    private String usernameAvatar;

    @TableField(exist = false)
    @Schema(description = "执行人头像", requiredMode = Schema.RequiredMode.REQUIRED)
    private String operUsernameAvatar;

    @TableField(exist = false)
    private LocalDate currDate;

    /**
     * 是否查看所有
     */
    @TableField(exist = false)
    private Boolean whetherAllPermissions;
    @TableField(exist = false)
    private String startTime;

    @TableField(exist = false)
    private String endTime;

    @TableField(exist = false)
    private Long teamId;


}
